package com.vegetable.modules.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 商品分类表单
 * </p>
 *
 * @author wangruijie
 * @since 2024-12-10
 */
@Data
@ApiModel(value = "ProductCategoryForm", description = "商品分类表单")
public class ProductCategoryForm implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("分类名称")
    @NotBlank(message = "分类名称不能为空")
    private String categoryName;

    @ApiModelProperty("分类编码")
    @NotBlank(message = "分类编码不能为空")
    private String categoryCode;

    @ApiModelProperty("父分类ID，0表示顶级分类")
    @NotNull(message = "父分类ID不能为空")
    private Long parentId;

    @ApiModelProperty("排序字段")
    private Integer sortOrder;

    @ApiModelProperty("分类图标")
    private String icon;

    @ApiModelProperty("分类描述")
    private String description;

    @ApiModelProperty("是否启用：0否1是")
    private Integer isEnabled;
}